Program View

The program view in AKD WorkBench is specific to AKD BASIC drives and can only be accessed using an AKD BASIC drive type in either online or offline mode. Programs can be compiled in offline mode, but an AKD BASIC drive must be connected to download and run a program.


  • Specifying a port number when connecting to an AKD BASIC will disable the console of the Program View.

Toolbar Options

The toolbar at the top of the program view contains a number of tools to assist you in programming.

New ...

The Program view loads as an empty window. Create a new program by clicking the new icon in the upper-left corner and selecting either BASIC or BASIC Using Current Drive Params. The BASIC selection will load an empty template. The BASIC Using Current Drive Params selection will populate the template with all current drive values. Then select the location and name of your new project file, and click save.

 

This will load the BASIC template from which you can begin programming.

Save / Save As

Once you have written a program, save it using the "Save" or "Save As" function on the toolbar .

Open

To open a previous project file click the "Open" function and locate your file in the explorer.

Edit Parameters Section

Clicking on the Edit Params Section tool will prompt you to populate the Params section of your code with all the current drive settings. Clicking yes will overwrite all current param defintions with the current drive values.

Compile / Download / Run

The Compile button will compile your source code to binary so that you may download the program to the drive.

The Download button will download your compiled code and source code to the drive by default. If you do not wish to download the source code to the drive, go to the options menu, choose download and de-select download source with binary.

The run button will issue a VM.START to start the BASIC program in the drive. If the active BASIC program in the editor is different than the program in the drive, the run button will compile and download the program before running.

Continue / Pause / Stop

The Continue, Pause, and Stop options allow you to control your program while it is running.

Debug

The Debugger allows you to set break points and step through your program.

View

Use Find and Replace to find keywords in your program and replace them with a new keyword

Use the Go To Line to go to a specific line of code

Watch will open the expression evaluator tab. The expression evaluator is only valid while using the debugger. You can evaluate any drive parameter or user defined variable when the program is paused by the debugger.

Call Stack will open the call stack tab

Format Document

The format document tool implements correct line indentation across all code.

Insert Code Snippet

The Insert Code Snippet tool presents a list of existing code snippets, which can be selected and inserted into the program at the point where the cursor is currently placed.

Upload?

The upload tool uploads the source code from the drive. If the source code has not been downloaded, this option is not available. The tools menu allows you to select if the source code is to be downloaded with the binary.

Lock

The lock tool password protects the source code in the drive. If a new program is downloaded to a drive, the original source code and password protection is erased.